

from django.urls import path
from .views import *

urlpatterns = [

    # 轮播图
    path("carousels/", HomeView.as_view({"get": "slidechow"})),

    # 图片验证码
    path("code/<str:uuid>/", UserView.as_view({"get": "img"})),

    # 登录
    path("login/<str:uuid>/", UserView.as_view({"post": "login"})),

    # 注册
    path("register/", UserView.as_view({"post": "register"})),

    # 忘记密码
    path("userinfo/", UserView.as_view({"put": "upuser"})),

    # 修改信息  删除学生 获取个人信息
    path("info/", UserInfoView.as_view({"put": "upuser_info", "get": "user_info"})),

    # 删除 个人信息
    path("del_info/<int:pk>/", UserInfoView.as_view({ "delete": "del_info"})),

    # 获取登录记录
    path("user_login/", UserLoginView.as_view({"get": "list_login"})),

    # 问候语
    path("greetings/", GreetingsView.as_view({"get": "list_greetings"})),

    # 节日问候语
    path("fes_greetings/", GreetingsView.as_view({"get": "list_fesgreetings"})),

    # 消息
    path("msg/", MessageView.as_view({"post": "add_msg", "get": "list_msg"})),

    #  获取菜单 添加菜单
    path("menus/", MenuView.as_view({"get": "list_menu", "post": "add_menu"})),

    # 修改菜单 删除菜单
    path("menu/<int:pk>/", MenuView.as_view({"put": "up_menu", "delete": "del_menu"})),

    # 添加 获取 搜索记录
    path("searchs/", SearchView.as_view({"post": "add_search", "get": "list_search"})),

    # 发送弹幕
    path("barrages/", BarrageView.as_view({"post": "add_barrage"})),

    # 创建订单 判断订单是否支付成功
    path("order/", OrderView.as_view({"post": "add_order", "get": "check_order"})),

    # 获取用户的全部订单
    path("order_list/", OrderView.as_view({"get": "list_order"})),

    # 获取没有支付的订单
    path("not_order/", OrderView.as_view({"get": "not_order"})),

    # 获取支付完成的订单
    path("pay_order/", OrderView.as_view({"get": "order_pay"})),

    # 获取没有支付的订单的地址 删除订单
    path("not_order/<int:pk>/", OrderView.as_view({"post": "not_order_get", "delete": "order_del"})),

    # 获取订单详情 取消支付订单
    path("order_details/<int:pk>/", OrderView.as_view({"get": "order_get_details", "delete": "not_order_del"})),

]
